package month4.day5.water;

public class Submarine implements Swim,Sonar{
    private String name;
    @Override
    public void swim() {
        System.out.println("涡轮旋转，推动移动");
    }

    @Override
    public void scan() {
        System.out.println("扫描所有移动的物体并显示");
    }

    @Override
    public String toString() {
        return "潜艇"+ name;
    }

    public Submarine(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
